﻿Public MustInherit Class clCasilla : Implements IEquatable(Of clCasilla)


    Public Enum ElSuelo
        Accesible
        Inaccesible
        DañinoAccesible
        DañinoInaccesible
    End Enum
    Protected ImagenPredeterminada As Image
    Public Sub New(ByVal suelo As ElSuelo, ByRef control As Control)
        _Control = control
        _Suelo = suelo
    End Sub
    Public Sub New()
        _Control = New PictureBox
        _Control.BackColor = Color.Black
        TryCast(_Control, PictureBox).BorderStyle = BorderStyle.FixedSingle
        _Suelo = ElSuelo.Accesible
    End Sub
    Public Property Control As Control
    Protected _Suelo As ElSuelo
    Public ReadOnly Property Suelo As ElSuelo
        Get
            Return _Suelo

        End Get
    End Property
    Public Overloads Shared Function Equals(ByVal A As clCasilla, ByVal B As clCasilla) As Boolean
        Return A.GetType = B.GetType.GetType And A.Control.Name = B.Control.Name
    End Function
    Public Overloads Function Equals(ByVal B As clCasilla) As Boolean Implements System.IEquatable(Of clCasilla).Equals
        Return clCasilla.Equals(Me, B)
    End Function
End Class
